﻿namespace Web.Control.Member.Public
{
    using System;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Text.RegularExpressions;
    using Lx.Web.Common.UI;
    using Lx.Web.Common.ControlsUI;
    using System.Collections;
    using System.IO;
    using Model.WWW_User;
    using BLF;
    using System.Collections.Generic;
    using Model.WWW_User.User;
    using Model.WWW_User.Teach;

    public class TReputation : BaseControl
    {
        protected string mymemberno = "";
        protected string memberno = "";
        protected ArrayList arrlist = new ArrayList();
        protected UserProfileModel userInfo = new UserProfileModel();
        /// <summary>
        /// 当前用户与该会员关系1好友，2已是联系人，0无int、
        /// </summary>
        protected int UserRelation = -1;
        protected List<int> intlist;
        protected TeachModel teachm = new TeachModel();
        protected override void OnLoad(EventArgs e)
        {
            
            if (Request["uid"] != null && !String.IsNullOrEmpty(Request["uid"].ToString()))
            {
                memberno = Request["uid"].ToString();
                mymemberno = HttpContext.Current.User.Identity.Name;
            }
            else
            {
                Response.End();
            }
           arrlist=BLF.WWW_User.Users.User.GetUserRtTProfile(memberno, mymemberno);
           if (arrlist == null)
           {
               Response.End();
           }
           UserRelation = (int)arrlist[0];
           userInfo = arrlist[1] as UserProfileModel;
           intlist = arrlist[2] as List<int>;
           teachm = arrlist[3] as TeachModel;

            this.DynamicTitle = GetText("{0}: speak {1}, learn {2} for language exchange - italki", new string[] { userInfo.Nickname, GetLanguageText(userInfo.MotherTongue), GetLanguageText(userInfo.TargetLanguage) });
            this.DynamicKeywords = GetText("{0}, speak {1}, learn {2}, language exchage", new string[] { userInfo.Nickname, GetLanguageText(userInfo.TargetLanguage), GetLanguageText(userInfo.MotherTongue) });
            this.DynamicDescription = Lx.Web.Common.UI.Globals.GetString(userInfo.Introduction, 200);
            base.OnLoad(e);
        }
   

    }
}
